package model

type DoorStatus uint8

const (
	None        DoorStatus = 0  //未知
	Started     DoorStatus = 1  //已开启
	Closed      DoorStatus = 2  //已关闭
	Doing       DoorStatus = 3  //运行中
	Stoped      DoorStatus = 4  //已停止
	CanPutGoods DoorStatus = 5  //可放货
	CanGetGoods DoorStatus = 6  //可取货
	Err         DoorStatus = 7  //故障
	Free        DoorStatus = 8  //空闲
	Completed   DoorStatus = 9  //完成
	Initing     DoorStatus = 10 //初始化
)

//小车类型
type Door struct {
	DeviceCode string     `json:"device_code"  binding:"required"` //设备编号
	Status     DoorStatus `json:"status"`                          //移动门的状态
	IsOnline   bool       `json:"is_online"`                       //是否在线 true:启用 false:禁用
	IsEnable   bool       `json:"is_enable"`                       //是否启用 true:启用 false:禁用
	AgvId      string     `json:"agv_id"`                          //占用的AGV编号
	MapName    string     `json:"map_name"`                        //地图名称
}
type DoorInfo struct {
	DeviceCode   string `json:"device_code"`
	Online       bool   `json:"online"`
	Status       int    `json:"status"`
	StatusString string `json:"status_string"`
	Error        string `json:"error"`
	ErrorInfo    string `json:"error_info"`
	IsEnable     bool   `json:"is_enable"` //是否启用 true:启用 false:禁用
	MapName      string `json:"map_name"`  //地图名称
}
